﻿@model MyNeighbourhood.Models.EventModel


<h2>
    @Html.DisplayFor(model => model.Name)
</h2>

<div class="event-detail-section">
    <img src="~/Images/custom/clock32.png" />
    <h5>@Html.DisplayFor(model => model.Date)</h5>
    <h5>@Html.DisplayFor(model => model.Time)</h5>
</div>

<div class="event-detail-section">
    <img src="~/Images/custom/home32.png" />
    <span>@Html.DisplayFor(model => model.Location.Street) </span>
    <span>@Html.DisplayFor(model => model.Location.Number)</span>
</div>

<div class="event-detail-section">
    @if (Model.IsPublic)
    {
        <img src="~/Images/custom/unlock32.png" />
        <h5>Public event</h5>
    }
    else
    {
        <img src="~/Images/custom/lock32.png" />
        <h5>Private event</h5>
    }
</div>

@if (Model.Website != null || Model.Email != null || Model.Phone != null)
{
    <div class="event-detail-section high">
        <img class="high" src="~/Images/custom/comment32.png" />
        <div>
            <h5>@Html.DisplayFor(model => model.Website)</h5>
            <h5>@Html.DisplayFor(model => model.Phone)</h5>
            <h5>@Html.DisplayFor(model => model.Email)</h5>
        </div>
    </div>
}

@if (Model.Target != null && Model.Target.Count > 0)
{
    <div class="event-detail-section">
        <img src="~/Images/custom/users32.png" />
        <div>
            @for (int i = 0; i < Model.Target.Count - 1; i++)
            {
                <span>@Html.DisplayFor(model => Model.Target[i].Name), </span>
            }
            <span>@Html.DisplayFor(model => Model.Target[Model.Target.Count - 1].Name)</span>
            @if (!String.IsNullOrEmpty(Model.OtherTargets))
            {
            <span>, @Html.DisplayFor(model => model.OtherTargets)</span>
            }
        </div>
    </div>
}

<div class="clearfix"></div>

@if (Model.AdditionalInfo != null)
{
    <p>@Html.DisplayFor(model => model.AdditionalInfo)</p>
}

<div class="clearfix"></div>

@if (Model.Participants != null)
{
    foreach (var part in Model.Participants)
    {
        if (part.Name != null)
        {
    <div class="event-participant-section">
        <img class="photo" src="@Url.Content(part.Photo)" />
        <div>@Html.DisplayFor(model => part.Name)</div>
        <div>(@Html.DisplayFor(model => part.Programme))</div>
    </div>
        }
    }
}
